// This is where project configuration and plugin options are located.
// Learn more: https://gridsome.org/docs/config

// Changes here require a server restart.
// To restart press CTRL + C in terminal and run `gridsome develop`

module.exports = {
	siteName: 'Gridsome',
	plugins: [
		//读取本地md文件
		{
			use: '@gridsome/source-filesystem',
			options: {
				typeName: 'BlogPost',
				path: './content/blog/**/*.md',
			}
		},
		//strapi导入
		{
			use: '@gridsome/source-strapi',
			options: {
				// apiURL: 'http://localhost:1337',
				apiURL: 'http://139.155.233.245:1337',
				queryLimit: 1000, // Defaults to 100
				contentTypes: ['post', 'tag'], //查询的集合
				singleTypes: ['general'],//单个节点
				loginData: {
					identifier: 'yangxinqiao',
					password: '1992yxqH'
				}
			}
		}
	],
	templates: {
		StrapiPost: [ //前缀默认为Strapi
			{
				path: '/post/:id',
				component: './src/templates/Post.vue',
				name:'post'
			}
		],
		StrapiTag: [ //前缀默认为Strapi
			{
				path: '/tag/:id',
				component: './src/templates/Tag.vue'
		
			}
		]
	}
}
